home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / seclau / mantform.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1995-05-08  |  7.1 KB  |  224 lines

  1. VERSION 2.00
  2. Begin Form MantForm 
  3.    Caption         =   "Maintenance"
  4.    ClientHeight    =   4020
  5.    ClientLeft      =   1095
  6.    ClientTop       =   1485
  7.    ClientWidth     =   7365
  8.    ControlBox      =   0   'False
  9.    Height          =   4425
  10.    Left            =   1035
  11.    LinkTopic       =   "Form2"
  12.    MaxButton       =   0   'False
  13.    MinButton       =   0   'False
  14.    ScaleHeight     =   4020
  15.    ScaleWidth      =   7365
  16.    Top             =   1140
  17.    Visible         =   0   'False
  18.    Width           =   7485
  19.    Begin CommandButton MasterP 
  20.       Caption         =   "Master Password"
  21.       Height          =   495
  22.       Left            =   4320
  23.       TabIndex        =   13
  24.       Top             =   3240
  25.       Width           =   1935
  26.    End
  27.    Begin CommandButton AddNew 
  28.       Caption         =   "&Add New"
  29.       Height          =   495
  30.       Left            =   360
  31.       TabIndex        =   12
  32.       Top             =   3240
  33.       Width           =   1215
  34.    End
  35.    Begin CommandButton Exit 
  36.       Caption         =   "&Exit"
  37.       Height          =   495
  38.       Left            =   6480
  39.       TabIndex        =   8
  40.       Top             =   3240
  41.       Width           =   735
  42.    End
  43.    Begin TextBox Text3 
  44.       Height          =   285
  45.       Left            =   4920
  46.       TabIndex        =   7
  47.       Top             =   1320
  48.       Width           =   2295
  49.    End
  50.    Begin TextBox Text2 
  51.       Height          =   285
  52.       Left            =   4920
  53.       TabIndex        =   6
  54.       Top             =   840
  55.       Width           =   2295
  56.    End
  57.    Begin TextBox Text1 
  58.       Height          =   285
  59.       Left            =   4920
  60.       TabIndex        =   5
  61.       Top             =   360
  62.       Width           =   2295
  63.    End
  64.    Begin CommandButton Remove 
  65.       Caption         =   "&Remove"
  66.       Height          =   495
  67.       Left            =   3120
  68.       TabIndex        =   4
  69.       Top             =   3240
  70.       Width           =   975
  71.    End
  72.    Begin CommandButton Change 
  73.       Caption         =   "&Change"
  74.       Height          =   495
  75.       Left            =   1920
  76.       TabIndex        =   3
  77.       Top             =   3240
  78.       Width           =   855
  79.    End
  80.    Begin ListBox Password 
  81.       Height          =   225
  82.       Left            =   3840
  83.       TabIndex        =   2
  84.       Top             =   2880
  85.       Visible         =   0   'False
  86.       Width           =   1215
  87.    End
  88.    Begin ListBox Program 
  89.       Height          =   225
  90.       Left            =   2280
  91.       TabIndex        =   1
  92.       Top             =   2880
  93.       Visible         =   0   'False
  94.       Width           =   1215
  95.    End
  96.    Begin ListBox ProgList 
  97.       Height          =   2370
  98.       Left            =   240
  99.       TabIndex        =   0
  100.       Top             =   240
  101.       Width           =   2295
  102.    End
  103.    Begin Label Label3 
  104.       Caption         =   "Password:"
  105.       Height          =   255
  106.       Left            =   3720
  107.       TabIndex        =   11
  108.       Top             =   1320
  109.       Width           =   975
  110.    End
  111.    Begin Label Label2 
  112.       Caption         =   "Program Name:"
  113.       Height          =   255
  114.       Left            =   3360
  115.       TabIndex        =   10
  116.       Top             =   840
  117.       Width           =   1335
  118.    End
  119.    Begin Label Label1 
  120.       Caption         =   "Program Description:"
  121.       Height          =   255
  122.       Left            =   2880
  123.       TabIndex        =   9
  124.       Top             =   360
  125.       Width           =   1935
  126.    End
  127. Sub About_Click ()
  128. End Sub
  129. Sub AddNew_Click ()
  130.     If MantForm.Text1.Text = "" Then
  131.         MsgBox "Need a Program Description", 0, "Add Program"
  132.         MantForm.Text1.SetFocus
  133.         Exit Sub
  134.         End If
  135.     If MantForm.Text2.Text = "" Then
  136.         MsgBox "Need a Program Name", 0, "Add Program"
  137.         MantForm.Text2.SetFocus
  138.         Exit Sub
  139.         End If
  140.     If MantForm.Text3.Text = "" Then
  141.         MsgBox "Need a Password", 0, "Add Program"
  142.         MantForm.Text3.SetFocus
  143.         Exit Sub
  144.         End If
  145.     MantForm.ProgList.AddItem MantForm.Text1.Text
  146.     MantForm.Program.AddItem MantForm.Text2.Text
  147.     MantForm.Password.AddItem MantForm.Text3.Text
  148.     MantForm.Text1.Text = ""
  149.     MantForm.Text2.Text = ""
  150.     MantForm.Text3.Text = ""
  151. End Sub
  152. Sub Change_Click ()
  153.     If MantForm.ProgList.ListIndex = -1 Then
  154.         MsgBox "No program selected", 0, "Change Program"
  155.         MantForm.Text1.SetFocus
  156.         Exit Sub
  157.         End If
  158.     If MantForm.Text1.Text = "" Then
  159.         MsgBox "Need a Program Description", 0, "Add Program"
  160.         MantForm.Text1.SetFocus
  161.         Exit Sub
  162.         End If
  163.     If MantForm.Text2.Text = "" Then
  164.         MsgBox "Need a Program Name", 0, "Add Program"
  165.         MantForm.Text2.SetFocus
  166.         Exit Sub
  167.         End If
  168.     If MantForm.Text3.Text = "" Then
  169.         MsgBox "Need a Password", 0, "Add Program"
  170.         MantForm.Text3.SetFocus
  171.         Exit Sub
  172.         End If
  173.     MantForm.Program.ListIndex = MantForm.ProgList.ListIndex
  174.     MantForm.Password.ListIndex = MantForm.ProgList.ListIndex
  175.     MantForm.ProgList.RemoveItem MantForm.ProgList.ListIndex
  176.     MantForm.Program.RemoveItem MantForm.Program.ListIndex
  177.     MantForm.Password.RemoveItem MantForm.Password.ListIndex
  178.     MantForm.ProgList.AddItem MantForm.Text1.Text
  179.     MantForm.Program.AddItem MantForm.Text2.Text
  180.     MantForm.Password.AddItem MantForm.Text3.Text
  181.     MantForm.Text1.Text = ""
  182.     MantForm.Text2.Text = ""
  183.     MantForm.Text3.Text = ""
  184. End Sub
  185. Sub Exit_Click ()
  186.     MantForm.Visible = False
  187.     Call RecordMaint
  188. End Sub
  189. Sub MasterP_Click ()
  190.     NewPass1$ = InputBox("Enter New Password", "Change Master Password")
  191.     NewPass2$ = InputBox("Re-Enter New Password", "Verify New Master Password")
  192.     If NewPass1$ = NewPass2$ Then MasterPassword = NewPass1$
  193. End Sub
  194. Sub MasterPassword_Click ()
  195.     MsgBox (MasterPassword)
  196.     NewPass1$ = InputBox$("Enter new Password", "Change Master Password")
  197.     If NewPass1$ = "" Then Exit Sub
  198.     NewPass2$ = InputBox$("Re-enter new Password", "Verify New Master Password")
  199.     If NewPass2$ = "" Then Exit Sub
  200.     If NewPass1$ = NewPass2$ Then MasterPassword = NewPass1$
  201. End Sub
  202. Sub ProgList_Click ()
  203.     MantForm.Program.ListIndex = MantForm.ProgList.ListIndex
  204.     MantForm.Password.ListIndex = MantForm.ProgList.ListIndex
  205.     MantForm.Text1 = MantForm.ProgList.Text
  206.     MantForm.Text2 = MantForm.Program.Text
  207.     MantForm.Text3 = MantForm.Password.Text
  208. End Sub
  209.                
  210. Sub Remove_Click ()
  211.     If MantForm.ProgList.ListIndex = -1 Then
  212.         MsgBox "No program selected", 0, "Remove Program"
  213.         Exit Sub
  214.         End If
  215.     MantForm.Program.ListIndex = MantForm.ProgList.ListIndex
  216.     MantForm.Password.ListIndex = MantForm.ProgList.ListIndex
  217.     MantForm.ProgList.RemoveItem MantForm.ProgList.ListIndex
  218.     MantForm.Program.RemoveItem MantForm.Program.ListIndex
  219.     MantForm.Password.RemoveItem MantForm.Password.ListIndex
  220.     MantForm.Text1.Text = ""
  221.     MantForm.Text2.Text = ""
  222.     MantForm.Text3.Text = ""
  223. End Sub
  224.